package com.xxq.semester.service.exam;

import com.xxq.semester.entity.exam.StudentAnswers;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author saki
 * @since 2025-07-13
 */
public interface IStudentAnswersService extends IService<StudentAnswers> {

    /**
     * 学生提交单个题目的答案
     */
    void submitAnswer(Integer studentId, Integer examId, Integer questionId, String answer);

    /**
     * 学生批量提交答案
     */
    void submitAnswers(Integer studentId, Integer examId, java.util.List<AnswerSubmission> answers);

    /**
     * 答案提交的内部类
     */
    class AnswerSubmission {
        private Integer questionId;
        private String answer;

        public Integer getQuestionId() {
            return questionId;
        }

        public void setQuestionId(Integer questionId) {
            this.questionId = questionId;
        }

        public String getAnswer() {
            return answer;
        }

        public void setAnswer(String answer) {
            this.answer = answer;
        }
    }
}
